//
// CFlareModel.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CFlareModel {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CFlareModel(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CFlareModel obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CFlareModel(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CFlareModel() {
    this(nel3dJNI.new_CFlareModel(), true);
  }

  public static void registerBasic() {
    nel3dJNI.CFlareModel_registerBasic();
  }

  public static CTransform creator() {
    long cPtr = nel3dJNI.CFlareModel_creator();
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public void traverseRender() {
    nel3dJNI.CFlareModel_traverseRender(swigCPtr, this);
  }

  public boolean isFlare() {
    return nel3dJNI.CFlareModel_isFlare(swigCPtr, this);
  }

  public void renderOcclusionTestMesh(IDriver drv) {
    nel3dJNI.CFlareModel_renderOcclusionTestMesh(swigCPtr, this, IDriver.getCPtr(drv), drv);
  }

  public void setNext(CFlareModel value) {
    nel3dJNI.CFlareModel_Next_set(swigCPtr, this, CFlareModel.getCPtr(value), value);
  }

  public CFlareModel getNext() {
    long cPtr = nel3dJNI.CFlareModel_Next_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CFlareModel(cPtr, false);
  }

  public static void initStatics() {
    nel3dJNI.CFlareModel_initStatics();
  }

  public static void updateOcclusionQueryBegin(IDriver drv) {
    nel3dJNI.CFlareModel_updateOcclusionQueryBegin(IDriver.getCPtr(drv), drv);
  }

  public static void updateOcclusionQueryEnd(IDriver drv) {
    nel3dJNI.CFlareModel_updateOcclusionQueryEnd(IDriver.getCPtr(drv), drv);
  }

  public void updateOcclusionQuery(IDriver drv) {
    nel3dJNI.CFlareModel_updateOcclusionQuery(swigCPtr, this, IDriver.getCPtr(drv), drv);
  }

  public void renderOcclusionMeshPrimitives(CMesh mesh, IDriver drv) {
    nel3dJNI.CFlareModel_renderOcclusionMeshPrimitives(swigCPtr, this, CMesh.getCPtr(mesh), mesh, IDriver.getCPtr(drv), drv);
  }

  public void setupOcclusionMeshMatrix(IDriver drv, CScene scene) {
    nel3dJNI.CFlareModel_setupOcclusionMeshMatrix(swigCPtr, this, IDriver.getCPtr(drv), drv, CScene.getCPtr(scene), scene);
  }

  public final static int MaxNumContext = nel3dJNI.CFlareModel_MaxNumContext_get();

  public final static int OcclusionTestFrameDelay = nel3dJNI.CFlareModel_OcclusionTestFrameDelay_get();

}
